package org.zhadoop.stream.cql.semanticanalyzer.parser.visitor;

import org.zhadoop.stream.cql.semanticanalyzer.parser.CQLParser.LogicExpressionOrContext;
import org.zhadoop.stream.cql.semanticanalyzer.parser.context.ExpressionContext;

/**
 * 表达式遍历
 * 
 * @author zwd
 *
 */
public class ExpressionVisitor extends AbsCQLParserBaseVisitor<ExpressionContext> {

	private ExpressionContext context = null;

	public ExpressionVisitor() {
		context = new ExpressionContext();
	}

	@Override
	protected ExpressionContext defaultResult() {
		return context;
	}

	@Override
	public ExpressionContext visitLogicExpressionOr(LogicExpressionOrContext ctx) {
		LogicExpressionOrVisitor visitor = new LogicExpressionOrVisitor();
		context.setExpression(visitor.visit(ctx));
		return context;
	}

}
